package com.lixixi.tingshu.user.api;

import com.lixixi.tingshu.common.result.Result;
import com.lixixi.tingshu.model.user.UserPaidTrack;
import com.lixixi.tingshu.model.user.VipServiceConfig;
import com.lixixi.tingshu.vo.user.UserInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient("user-service")
public interface UserApiFeignClient {

	// /api/user/wxLogin
	@GetMapping("/api/user/wxLogin/getUserInfo/forFeign")
	Result<UserInfoVo> getUserInfoForFeign(@RequestParam("userId") Long userId);

	@GetMapping("/api/user/wxLogin/test2")
	String getToken();

	// /api/user/userInfo
	@PostMapping("/api/user/userInfo/userIsPaidTrack/{albumId}")
	Result<Map<Long, Integer>> userIsPaidTrack(@PathVariable("albumId") Long albumId,
											   @RequestBody List<Long> trackIdList);


	@GetMapping("/api/user/userInfo/userIsPaidTrackIdList/{albumId}")
	List<Long> userIsPaidTrackIdList(@PathVariable("albumId") Long albumId);

	// /api/user/vipServiceConfig
	@GetMapping("/api/user/vipServiceConfig/findById/{itemId}")
	Result<VipServiceConfig> findVipServiceById(@PathVariable("itemId") Long itemId);


}
